package com.es.demo.service;

import com.es.demo.domain.Article;

import java.io.IOException;
import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @author shengtao
 * @Description:
 * @date 2018/10/31 19:22
 */
public interface IArticleServer {
    Boolean isEmpty();

    Article save(String index,String type,Article article) throws IOException;

    Article saveJson(String index,String type,Article article) throws IOException;

    Article update(String index,String type,String id,Article article) throws IOException, ExecutionException, InterruptedException;

    Article delete(String index,String type,String id);

    Article get(String index,String type,String id) throws IOException;

    List<Article> matchAllQuery() throws IOException;

    List<Article> searchLike(Article article) throws IOException;

    List<Article> muiltiSearch(Article article) throws IOException;
    //List<Article> query(String index,String type);
}
